package com.rran.study.designpattern.structural.facade;

/**
 * @author yy
 * @Type Request.java
 * @Desc
 * @date 2020/7/26 11:45
 */
public class Request {

    private SaveToDb saveToDb;
    private SendMsg sendMsg;
    private Validate validate;

    public Request() {
        saveToDb = new SaveToDb();
        sendMsg = new SendMsg();
        validate = new Validate();
    }

    public void doRequest() {
        validate.validate();
        saveToDb.saveToDb();
        sendMsg.SendMsg();
    }
}
